//    Copyright (c) 2009 Elwyn Malethan
//
//    This file is part of SeemoreJ.
//
//    SeemoreJ is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    SeemoreJ is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.

//    You should have received a copy of the GNU General Public License
//    along with SeemoreJ.  If not, see <http://www.gnu.org/licenses/>.

package com.malethan.seemorej.crud;

import com.malethan.seemorej.Accepts;

public interface CrudController<T> {
    /**
     * Shows list of all the records for T, retreived using GenericDao
     *
     * @return null, the view is rendered in the action
     * @throws java.io.IOException
     */
    void list() throws Exception;

    void show() throws Exception;

    void edit() throws Exception;

    @Accepts(method = com.malethan.seemorej.HttpMethod.POST)
    void create() throws Exception;

    @Accepts(method = com.malethan.seemorej.HttpMethod.POST)
    void update() throws Exception;

    @Accepts(method = com.malethan.seemorej.HttpMethod.POST)
    void delete() throws Exception;
}
